set more off

use dataset, clear

keep if abs(x) < 100

label variable pcteligible2013 "Potential Eligibility 2013"
label variable logvap2010 "Log Voting Age Population"
label variable pct65plus "Pct Over 65"
label variable lmedianincome "Log Income"
label variable demvoteshare2012 "Democratic Vote 2012"
label variable pctpoverty "Pct in Poverty"
label variable pcths "Pct HS or Less"
label variable pctui2013 "Pct Uninsured 2013"
label variable dpctui20142013 "Change Uninsured 2014-2013"

local X pctui2013 pcteligible2013 pctwhite logvap2010 pct65plus pcths demvoteshare2012 lmedianincome pctpoverty 

local j = 1

foreach x in `X' {

	local templabel : var label `x'

	#delimit

	gr tw 
	(sc `x' x, msize(tiny) col(gs13))
	(lpolyci `x' x if x < 0, clcol(black) lwid(medthick) ciplot(rline) alpat(solid) alcol(black) alwid(thin))
	(lpolyci `x' x if x > 0, clcol(black) lwid(medthick) ciplot(rline) alpat(solid) alcol(black) alwid(thin))
		,
			plotregion(style(none))
			xline(0)
			ylab(, angle(horiz))
			xtitle("Distance from border")
			legend(off)
			nodraw
			title(`templabel')		
			name(g`j', replace)
			;

	#delimit cr

	local mygraphs `mygraphs' g`j'

	local j = `j' + 1

}

gr combine `mygraphs'

gr export "_output/figureA11.pdf", replace
gr close
